﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.Views.ExportToRTRStatusTemplateSelector
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Windows;
using System.Windows.Controls;


namespace DnProcessSimulateCommands.ExportToRTR.Views;

public class ExportToRTRStatusTemplateSelector : DataTemplateSelector
{
  public override DataTemplate SelectTemplate(object item, DependencyObject container)
  {
    if (item is IExportToRTRTreeViewItem toRtrTreeViewItem)
    {
      switch (toRtrTreeViewItem.ExportToRTRStatus)
      {
        case ExportToRTRTreeViewStatusType.TREE_VIEW_STATUS_TYPE_OK:
          return this.StatusOkTemplate;
        case ExportToRTRTreeViewStatusType.TREE_VIEW_STATUS_TYPE_WARNING:
          return this.StatusWarningTemplate;
        case ExportToRTRTreeViewStatusType.TREE_VIEW_STATUS_TYPE_ERROR:
          return this.StatusErrorTemplate;
      }
    }
    return this.StatusOkTemplate;
  }

  public DataTemplate StatusOkTemplate { get; set; }

  public DataTemplate StatusWarningTemplate { get; set; }

  public DataTemplate StatusErrorTemplate { get; set; }
}
